﻿Imports System.Data.SqlClient
Public Class f_usuarios

    Dim c As New Controlador
    Public alta_us As Boolean = False

    Private Sub f_usuarios_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        c.muestra_usuarios()
        dg_usuarios.Columns(0).HeaderText = "Nombre"
        dg_usuarios.Columns(1).HeaderText = "Clave"
        dg_usuarios.Columns(2).HeaderText = "Tipo"
        dg_usuarios.Columns(4).HeaderText = "Telefono"
        dg_usuarios.Columns(5).HeaderText = "Direccion"
        dg_usuarios.Columns(6).HeaderText = "Email"
    End Sub


    Private Sub tb_b_nombre_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_nombre.TextChanged
        c.buscar_us()
    End Sub

    Private Sub cb_b_tipo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_b_tipo.SelectedIndexChanged
        c.buscar_us()
    End Sub

    Private Sub tb_b_telefono_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_telefono.TextChanged
        c.buscar_us()
    End Sub



    Private Sub dg_usuarios_RowStateChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowStateChangedEventArgs) Handles dg_usuarios.RowStateChanged
        Me.alta_us = False
    End Sub

End Class